package com.it.testDemo;

import com.it.service.UserService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestAnnontation {
    @Test
    public void test(){
        ApplicationContext context=new ClassPathXmlApplicationContext("beanAnnonation.xml");
        UserService userService = context.getBean("userService", UserService.class);
        System.out.println(userService);
        userService.add();
    }
}
